#include <stdio.h>
#define Max 10;
int main()
{

    int a[] = {1, 4, 3, 5, 8, 9, 2, 6, 0, 7};

    for (int i = 0; i < 10; i++)
    {
        printf("%d \t", a[i]);
    }
    int flag = 1;
    for (int i = 9; i > 0; i--)
    {

        if (flag)
        {
            for (int j = 0; j < i; j++)
            {
                flag = 0;

                if (a[j] > a[j + 1])
                {
                    int tmp = a[j];
                    a[j] = a[j + 1];
                    a[j + 1] = tmp;
                    flag = 1;
                }
            }
        }
    }
    printf("\n");
    for (int i = 0; i < 10; i++)
    {
        printf("%d \t", a[i]);
    }
    return 0;
}